"""
首页
"""
from selenium.webdriver.common.by import By
from pom.baseActivity import BaSeActivity

class MainActivity(BaSeActivity):

    _troggle_btn= (By.XPATH,'//*[@resource-id="org.cnodejs.android.md:id/toolbar"]/android.widget.ImageButton')
    _create_topic_btn = (By.ID,'org.cnodejs.android.md:id/fab_create_topic')


    @property
    def troggle_btn(self):
        """
        获取抽屉按钮 组件
        :return:
        """
        return self.driver.find_element(*self._troggle_btn)

    @property
    def create_topic_btn(self):
        return self.driver.find_element(*self._create_topic_btn)

if __name__ == '__main__':
    mainact = MainActivity()
    # mainact.troggle_btn.click()
    mainact.create_topic_btn.click()